Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full example for beginers #59

Closed
wants to merge 3 commits into from
Closed

Conversation

c-git
Copy link

@c-git c-git commented Nov 9, 2023

Warning included for using for also publishing as it runs on both pull requests and pushes. Wasn't sure what was the best way to express that they need to not just use it verbatim if they are also going to be publishing using the same workflow

@c-git
Copy link
Author

c-git commented Nov 9, 2023

Added where to put the file for beginners

@obi1kenobi
Copy link
Owner

This is definitely nice for beginners, but I think it makes it worse for people who are already comfortable with GitHub Actions because it's more verbose. GitHub Actions usually tend to start by showing the smallest code to run them, then expand into an end-to-end example. For example, consider: https://github.com/actions/setup-python

It's also a bit dangerous because it presents an example workflow that is configured to break on breaking changes, and then runs it on every PR. Many people's workloads are not aligned with this approach, and the example will break for them and be quite frustrating.

I think the basic idea here is sound, and just requires another half hour or hour of polishing work:

  • looking at how other GitHub Actions in the ecosystem are documented
  • writing a basic workflow that does cargo publish and perhaps is triggered on pushed version number tags
  • placing that workflow in a new section such that the explanation feels natural and neither overly verbose nor too brisk

@c-git
Copy link
Author

c-git commented Nov 10, 2023

Ok makes sense, I only push to main when I'm going to release hence that's why it works for me. I haven't found a simple workflow that does cargo publish yet that I can use as an example. I will have to look into triggering on version number tags as well. I also agree about putting it in a new section (I was on the fence about the placement). However, it don't think it's just an hour of work left because of the amount I need to go search for and test. I propose to close this PR for now and reopen once I understand github actions a bit more and have a good example to pattern on. Let me know what you think.

@obi1kenobi
Copy link
Owner

obi1kenobi commented Nov 10, 2023 via email

@c-git
Copy link
Author

c-git commented Nov 10, 2023

Ok cool will reopen after I get a better understanding of publishing crates from actions

@c-git c-git closed this Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants